include:
  - pkg.pkg-init
libmemcached-install:
  file.managed:
    - name: /usr/local/src/libmemcached-1.0.18.tar.gz
    - source: salt://libmemcached/files/libmemcached-1.0.18.tar.gz
    - user: root
    - group: root
    - mode: 644
  cmd.run:
    - name: cd /usr/local/src && sudo tar zxf libmemcached-1.0.18.tar.gz && cd libmemcached-1.0.18 && sudo ./configure --prefix=/usr/local/libmemcached && sudo make && sudo make install
    - unless: test -d /usr/local/libmemcached
    - require:
      - file: libmemcached-install
